home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PROGEDIT / H402.ZIP / ELV17SRC.ZIP / DOC.ZIP / CTAGS.DOC next >
Text File  |  1992-12-30  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4.           CTAGS                                                       CTAGS
  5.  
  6.  
  7.  
  8.  
  9.           NAME
  10.                ctags - Generates "tags" and (optionally) "refs" files
  11.  
  12.           SYNOPSIS
  13.                ctags [-stvra] filesnames...
  14.  
  15.           DESCRIPTION
  16.                ctags generates the "tags"  and "refs" files from a group of
  17.                C source  files.  The "tags"  file is used  by Elvis' ":tag"
  18.                command, control-] command,  and -t option.  The "refs" file
  19.                is sometimes used by the ref(1) program.
  20.  
  21.                Each  C source  file is scanned  for #define  statements and
  22.                global  function  definitions.  The  name  of  the macro  or
  23.                function becomes the name of a tag.  For each tag, a line is
  24.                added to the "tags" file which contains:
  25.                            - the name of the tag
  26.                            - a tab character
  27.                            - the name of the file containing the tag
  28.                            - a tab character
  29.                            - a way to find the particular line within the file.
  30.  
  31.                The  filenames list  will typically  be the  names of  all C
  32.                source files in the current directory, like this:
  33.                     $ ctags -stv *.[ch]
  34.  
  35.           OPTIONS
  36.                -t   Include  typedefs.  A  tag will  be generated  for each
  37.                     user-defined  type.  Also  tags will  be  generated for
  38.                     struct  and enum  names.   Types are  considered to  be
  39.                     global if they are defined in a header file, and static
  40.                     if they are defined in a C source file.
  41.  
  42.                -v   Include variable declarations.  A tag will be generated
  43.                     for each  variable, except for those  that are declared
  44.                     inside the body of a function.
  45.  
  46.                -s   Include  static tags.  Ctags  will normally  put global
  47.                     tags in the "tags" file, and silently ignore the static
  48.                     tags.  This flag  causes both global and static tags to
  49.                     be added.   The name  of a  static tag is  generated by
  50.                     prefixing the  name of the declared  item with the name
  51.                     of  the  file where  it  is defined,  with  a colon  in
  52.                     between.   For  example,  "static foo(){}"  in  "bar.c"
  53.                     results in a tag named "bar.c:foo".
  54.  
  55.                -r   This causes  ctags to generate both  "tags" and "refs".
  56.                     Without -r, it would only generate "tags".
  57.  
  58.                -a   Append  to "tags", and  maybe "refs".   Normally, ctags
  59.                     overwrites these  files each time it  is invoked.  This
  60.                     flag  is useful  when  you have  to many  files in  the
  61.                     current  directory for  you to  list  them on  a single
  62.  
  63.  
  64.           Command Reference               1                          Page 1
  65.  
  66.  
  67.  
  68.  
  69.  
  70.           CTAGS                                                       CTAGS
  71.  
  72.  
  73.  
  74.                     command-line;  it  allows you  to  split the  arguments
  75.                     among several invocations.
  76.  
  77.           FILES
  78.                tags A cross-reference that lists each tag name, the name of
  79.                     the source file that contains it, and a way to locate a
  80.                     particular line in the source file.
  81.  
  82.                refs The "refs"  file contains the definitions  for each tag
  83.                     in the  "tags" file, and  very little else.   This file
  84.                     can be useful, for example, when licensing restrictions
  85.                     prevent you from making the source code to the standard
  86.                     C  library   readable  by  everybody,   but  you  still
  87.                     everybody to know  what arguments the library functions
  88.                     need.
  89.  
  90.           BUGS
  91.                ctags   is   sensitive  to   indenting   and  line   breaks.
  92.                Consequently, it  might not  discover all  of the tags  in a
  93.                file that is formatted in an unusual way.
  94.  
  95.           SEE ALSO
  96.                elvis(1), refs(1)
  97.  
  98.           AUTHOR
  99.                Steve Kirkendall
  100.                kirkenda@cs.pdx.edu
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.           Command Reference               1                          Page 2
  131.  
  132.  
  133.